package com.ashin.reference;

/**
 * -XX:+PrintGCDetails
 *
 * @Author: Ashin
 * @Date: 2021/9/23
 * @Description: com.ashin.reference
 * @Version: 1.0.0
 */
public class ReferenceCountingGC {

    private static final int _1MB = 1024 * 1024;
    private Object instance = null;

    public static void main(String[] args) {
        ReferenceCountingGC objA = new ReferenceCountingGC();
        ReferenceCountingGC objB = new ReferenceCountingGC();
        objA.instance = objB;
        objB.instance = objA;

        objA = null;
        objB = null;

        System.gc();
    }
}
